import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:Smart/utils/screen_unit/gs_screen_util.dart';

import 'gs_ota_update_page.dart';

//OTA
class OTAPage extends StatefulWidget {
  _OTAPageState createState() => _OTAPageState();
}

class _OTAPageState extends State<OTAPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          Container(

            margin: EdgeInsets.fromLTRB(20, 25, 150, 0),
            child: Row(
              children: [
                Icon(Icons.arrow_back_ios),
                SizedBox(width: 100,),
                Center(
                  child: Text('OTA版本'),
                )
              ],
            ),
          ),
          
          Container(
            margin: EdgeInsets.fromLTRB(30, 30, 30, 100),
            height: 80,
            width: 690,
            //设置边框
            decoration: BoxDecoration(
                //设置阴影效果
                boxShadow: [BoxShadow(color:Color(0xff9698A3),offset: Offset(5.0,5.0),blurRadius: 10.0)],
                color: Color(0xffFFFFFF),
                //设置边框圆角
                borderRadius: BorderRadius.circular(10.w)
                //设置边框圆角
               // borderRadius: BorderRadius.circular(10),
                //设置阴影效果
                // boxShadow: [BoxShadow(color: Color(0xff9698A3),
                //   offset:Offset (0,10),
                //   //阴影模糊程度,阴影模糊大小spreadRadius: 1.0
                //     blurRadius:10,
                //     spreadRadius: 1.0
                // ),
                // ]
            ),
            child:Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Row(
                  children: [
                    Container(
                      height: 50,
                      width: 50,
                      child: Image.network('https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1247111737,2344380133&fm=26&gp=0.jpg'),
                    ),
                    Column(
                      // mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Text('smart 1.1.0'),
                        Text('2021-3-10')
                      ],
                    ),
                  ],
                )

                // ListTile(
                //   leading:Image.network('https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1247111737,2344380133&fm=26&gp=0.jpg'),
                //   title: Text('smart 1.1.0',style: TextStyle(fontSize: 20.w,color: Color(0xff333333)),),
                //   subtitle: Text('2021-3-10',style:TextStyle(fontSize: 10.w,color: Color(0xff333333))),
                // )
              ],
            ),
          ),
          Column(
            children: [
             Container(
               padding: EdgeInsets.fromLTRB(80, 0,0, 0),


               alignment: Alignment.bottomCenter,
               child:  Row(
              //   mainAxisAlignment: MainAxisAlignment.center,
                 children: [
                   Text('辅助驾驶'),
                   Icon(Icons.adjust_outlined),
                   Text('支持一键备车')
                 ],
               ),
             ),
              // SizedBox(height: 10,),
             Container(
               padding: EdgeInsets.fromLTRB(80, 0,0, 0),
               // alignment: Alignment.center,
               child:  Row(
               //  mainAxisAlignment: MainAxisAlignment.center,
                 children: [
                   Text('车机相关'),
                   Column(
                     crossAxisAlignment:CrossAxisAlignment.start ,
                     children: [
                       Row(

                         children: [
                           Icon(Icons.adjust_outlined),
                           Text('新增XXXX功能'),
                         ],
                       ),
                       Row(
                         // mainAxisAlignment: MainAxisAlignment.start,
                         // crossAxisAlignment: CrossAxisAlignment.start,
                         children: [
                           Icon(Icons.adjust_outlined),
                           Text('增加语音控制指令')
                         ],
                       )
                     ],
                   )
                 ],
               ),
             ),
            ],
          ),
         

         Container(
           margin: EdgeInsets.fromLTRB(50, 120, 50, 40),
           height: 30.w,
           width: 200.w,
           //透明按钮
           child:  FlatButton(
               child: Text('请前往车机升级',style: TextStyle(fontSize: 20.w,color: Color(0xff141413)),),
               onPressed:(){
                    Navigator.push(
                      context,MaterialPageRoute(builder: (context){
                        return UpDatePage();
                    })
                    );
               }),
         )

        ],
      ),
    );
  }
}
